You are here: Excel CSP VoiceXML Installation Guide > Configuration and Tuning > Capturing System Metrics
This section explains how to capture system metrics for analysis. Metrics such as First Time to Audio and TTS Stream Latency are useful for pinpointing performance issues and understanding system timings.
To capture system metrics:
1 Edit the vocalos-node.xml file, located in the /opt/VocalOS/Server/server/nodeserver/conf directory.
2 Search for MetricManager in the file.
3 Uncomment out the file metrics handler node XML.
4 Save the changes.
5 Restart the server.
The following example shows the file metrics handler node in the vocalos-node.xml file.
<node name="file metrics handler"> <map> <entry key="handler" value="net.vocalocity.common.util.jmx.metric.handler.FileMetricHandler"/> <entry key="file" value="${jboss.server.home.dir}/log/metrics.log"/> <entry key="append" value="true"/> <entry key="pattern" value=".*"/> <entry key="separator" value=","/> <entry key="dateFormat" value="MM.dd.yyyy HH:mm:ss.SSS"/> </map> </node> |
The handlers available to you are implementations of the net.vocalocity.common.util.jmx.metricImetricHandler interface which the MetricManager will dispatch metric events to for processing. The handler in the example writes metrics to a file, based on the configuration settings. The following table explains the configuration settings.
Parameter |
Description |
---|---|
pattern |
A regex-based pattern for filtering metrics. The default is .* which is a wildcard regex. You can specify vocalos.tts.* to specify you want only TTS-related metrics. |
append |
Indicates whether to append or truncate it on startup |
separator |
Indicates what separator you want to use between fields |
dateFormat |
A valid java.util.DateFormat date format specifier |
The following example shows what a metric entry might look like.
10.19.2004 13:57:21.034,111882788-bk8cy-1098208619326-a304b6249b8ff00799668c126bfddd73,tts,null,vocalos.tss.stream_latency,40 |
The following table explains each column of the metric.
Column |
Description |
---|---|
10/19/2004 13:57:21.034 |
Date |
111882788.....bfddd73 |
Session ID |
tts |
Category |
null |
Metric type, or null if not specified |
vocalos.tts.stream_latency |
Metric name |
40 |
Metric value, or string value of metric if complex |
To capture only tts metrics, enter a regexp such as:
.*tts.*
The following table shows the metrics that are available.
Category |
Name |
Description |
---|---|---|
Telephony |
vocalos.telephony.time_to_first_audio |
The time between answer to when the first audio packet is played |
Telephony |
vocalos.telephony.time_to_answer |
The time from OFFERED until we issue an ANSWER |
Telephony |
vocalos.telephony.audio_play_count |
The number of audio plays we issue for a channel |
Telephony |
vocalos.telephony.call_summary |
A metric that is dispatched to summarize activity across channels on a system |
TTS |
vocalos.tts.stream_latency |
The amount of time to stream audio |
Runtime |
vocalos.runtime.snapshot |
A periodic snapshot of vital system data such as threads, and memory |
The following table describes the metric handlers that are available.
Class |
Description |
---|---|
FileMetricHandler |
Writes metrics to a file |
JDBCMetricHandler |
Writes metrics to a JDBC-compliant database |
JMXMetricHandler |
Sends metrics as a JMX notification |
Log4JMetricHandler |
Writes metrics as a log entry using log4j |
All metric handlers are located in the following package:
net.vocalocity.common.util.jmx.metric.handler
You can customize the log4j metric handler to capture different categories and logging levels. The following table describes the key values.
Key |
Description |
---|---|
category |
Changes the log4j category to use when logging metrics. The default value is Metric. |
level |
Changes the log4j severity level to use when logging metrics. The default value is Debug. |
The following example shows how to customize the log handler for the log4j metric handler.
<node name="log handler"> <map> <entry key="handler" value="net.vocalocity.common.util.jmx.metric. <entry key="category" value="mymetrics"/> <entry key="level" value="info"/> </map> </node> |